<template>
    <div id="loading">
        <div id="preloader_2">
            <span class="span1"></span>
            <span class="span2"></span>
            <span class="span3"></span>
            <span class="span4"></span>
        </div>
    </div>
</template>

<script>
export default {
  name:'loading'
};
</script>

<style scoped>
#loading {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100vh;
  width: 100vw;
  background-color: rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
}
/* .loading-content{
    width: 5rem;
    height: 5rem;
    display: flex;
    justify-content: center;
    border-radius: 2.5rem;
    box-shadow: 2px 2px 20px 1px;
    color: mediumvioletred;
    align-items: center;
} */
#preloader_2 {
  position: relative;
  /* left: 50%; */
  width: 4rem;
  height: 4rem;
}
#preloader_2 span {
  display: block;
  bottom: 0px;
  width: 2rem;
  height: 2rem;
  background: #9b59b6;
  position: absolute;
}
#preloader_2 .span1 {
  animation: preloader_2_1 1.5s infinite ease-in-out;
}
#preloader_2 .span2 {
  left: 20px;
  animation: preloader_2_2 1.5s infinite ease-in-out;
}
#preloader_2 .span3 {
  top: 0px;
  animation: preloader_2_3 1.5s infinite ease-in-out;
}
#preloader_2 .span4 {
  top: 0px;
  left: 20px;
  animation: preloader_2_4 1.5s infinite ease-in-out;
}
@keyframes preloader_2_1 {
  0% {
    transform: translateX(0px) translateY(0px) rotate(0deg);
    border-radius: 0px;
  }
  50% {
    transform: translateX(-20px) translateY(-10px) rotate(-180deg);
    border-radius: 20px;
    background: #3498db;
  }
  80% {
    transform: translateX(0px) translateY(0px) rotate(-360deg);
    border-radius: 0px;
  }
  100% {
    transform: translateX(0px) translateY(0px) rotate(-360deg);
    border-radius: 0px;
  }
}
@keyframes preloader_2_2 {
  0% {
    transform: translateX(0px) translateY(0px) rotate(0deg);
    border-radius: 0px;
  }
  50% {
    transform: translateX(20px) translateY(-10px) rotate(180deg);
    border-radius: 20px;
    background: #f1c40f;
  }
  80% {
    transform: translateX(0px) translateY(0px) rotate(360deg);
    border-radius: 0px;
  }
  100% {
    transform: translateX(0px) translateY(0px) rotate(360deg);
    border-radius: 0px;
  }
}
@keyframes preloader_2_3 {
  0% {
    transform: translateX(0px) translateY(0px) rotate(0deg);
    border-radius: 0px;
  }
  50% {
    transform: translateX(-20px) translateY(10px) rotate(-180deg);
    border-radius: 20px;
    background: #2ecc71;
  }
  80% {
    transform: translateX(0px) translateY(0px) rotate(-360deg);
    border-radius: 0px;
  }
  100% {
    transform: translateX(0px) translateY(0px) rotate(-360deg);
    border-radius: 0px;
  }
}
@keyframes preloader_2_4 {
  0% {
    transform: translateX(0px) translateY(0px) rotate(0deg);
    border-radius: 0px;
  }
  50% {
    transform: translateX(20px) translateY(10px) rotate(180deg);
    border-radius: 20px;
    background: #e74c3c;
  }
  80% {
    transform: translateX(0px) translateY(0px) rotate(360deg);
    border-radius: 0px;
  }
  100% {
    transform: translateX(0px) translateY(0px) rotate(360deg);
    border-radius: 0px;
  }
}
</style>